---
title: PublishObject.HtmlType Property (Excel)
keywords: vbaxl10.chm652079
f1_keywords:
- vbaxl10.chm652079
ms.prod: excel
api_name:
- Excel.PublishObject.HtmlType
ms.assetid: 16eb28e2-6535-7c44-ad8b-92078d44452a
ms.date: 06/08/2017
---


# PublishObject.HtmlType Property (Excel)

Returns or sets the type of HTML generated by Microsoft Excel when you save the specified item to a Web page. Can be one of the  **[XlHtmlType](xlhtmltype-enumeration-excel.md)** constants listed in the following table, specifying whether the item is static or interactive in the Web page. The default value is **xlHtmlStatic** .


## Syntax

 _expression_ . **HtmlType**

 _expression_ A variable that represents a **PublishObject** object.


## Remarks





| **XlHtmlType** can be one of these **XlHtmlType** constants.|
| **xlHtmlCalc** . Use the Spreadsheet component.|
| **xlHtmlChart** . Use the Chart component.|
| **xlHtmlList** . Use the PivotTable component.|
| **xlHtmlStatic** . Use static (noninteractive) HTML for viewing only.|

## Example

This example saves the range D5:D9 on the First Quarter worksheet in the active workbook to a Web page called " `stockreport.htm`". 


```vb
With ActiveWorkbook.PublishObjects.Add(SourceType:=xlSourceRange, _ 
 Filename:="\\Server\stockreport.htm", Sheet:="First Quarter", Source:="$G$3:$H$6", _ 
 HtmlType:=xlHtmlStatic, DivID:="Book1_4170") 
 .Publish (True) 
 .AutoRepublish = False 
End With
```


## See also


#### Concepts


[PublishObject Object](publishobject-object-excel.md)

